/*----------------------------------------------------------------------
  - File name      : STC8Ax_STARTUP.c
  - Author         : Quark Team
  - Update date    : 2020-09-11                   
  -	Copyright      : Gevico Electronic studio   
  - Module comments: MCU startup mdule driver.
-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/
#include "STC8Ax_STARTUP.h"
#include "stdio.h"
/*-----------------------------------------------------------------------
|                                 DATA                                  |
-----------------------------------------------------------------------*/

/*-----------------------------------------------------------------------
|                               FUNCTION                                |
-----------------------------------------------------------------------*/

/*--------------------------------------------------------
| @Description: Redefining printf function               |
| @param      : char c                                   |
| @return     : char                                     |
--------------------------------------------------------*/

#if (PRINTF_ENABLE == 1)      
char putchar(char c)
{
	#if   (PRINTF_UART == 1)
	{
	  UART1_Send_Byte(c);
	}
	#elif (PRINTF_UART == 2)
	{
      UART2_CLEAR_BUSY_FLAG();
	  UART2_Send_Byte((uint8)c);	
	}
	#elif (PRINTF_UART == 3)
	{
      UART3_CLEAR_BUSY_FLAG();
	  UART3_Send_Byte((uint8)c);	
	}
	#elif (PRINTF_UART == 4)
	{
      UART4_CLEAR_BUSY_FLAG();
	  UART4_Send_Byte((uint8)c);	
	}
	#endif
	return c;
}
#endif


/*-----------------------------------------------------------------------
|          END OF FLIE        (C) COPYRIGHT Gevico Electronics          | 
-----------------------------------------------------------------------*/



